const liebiao = document.querySelector('.liebiao')

const a1 = ajax({
    url: '/bb',
    data: `category_id=747&page=1&sort=sort&num=20&type=shop&channel_id=1001`,
    dataType: 'json',
    success(a1) {
        console.log(a1)
        let html = "";
        for (let i = 0; i < a1.data.list.length; i++){
                html+=`
                <div class="xg1">
                <figure>
                    <img src="${a1.data.list[i].spuInfo.images}" alt="">
                </figure>
                <div class="xq">
                    <h3>${a1.data.list[i].spuInfo.spuTitle}</h3>
                    <h5>${a1.data.list[i].spuInfo.spuSubTitle}</h5>
                </div>
                <div class="price">
                    <span>￥${a1.data.list[i].spuInfo.price}</span>
                </div>
                </div>
            `;
        }
        liebiao.innerHTML = html
    }
})

const a2 = ajax({
    url: '/bb',
    data: `category_id=747&page=2&sort=sort&num=20&type=shop&channel_id=1001`,
    dataType: 'json',
    success(a2) {
        console.log(a2)
        let html = "";
        for (let i = 0; i < a2.data.list.length; i++){
                html+=`
                <div class="xg1">
                <figure>
                    <img src="${a2.data.list[i].spuInfo.images}" alt="">
                </figure>
                <div class="xq">
                    <h3>${a2.data.list[i].spuInfo.spuTitle}</h3>
                    <h5>${a2.data.list[i].spuInfo.spuSubTitle}</h5>
                </div>
                <div class="price">
                    <span>￥${a2.data.list[i].spuInfo.price}</span>
                </div>
                </div>
            `;
        }
        liebiao.innerHTML += html
    }
})